package com.neulogistics.contrib.warehouse.api.application.command;

import com.blackto.lib.mediat.unicast.IRequest;
import com.neulogistics.contrib.warehouse.api.application.validator.annotation.InList;
import com.neulogistics.contrib.warehouse.domain.model.valueobject.GoodsItem;
import com.neulogistics.infrastructure.common.serviceresult.BaseResponse;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import java.io.Serializable;
import java.util.List;

@Data
public class TransferOrderCommand implements IRequest<BaseResponse<Boolean>>, Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 调拨单id
     */
    @NotNull
    @Positive
    private Long transferOrderId;

    /**
     * 调度类型：1:配送；2:退货；3:换货
     */
    @NotNull
    @InList(values = {1, 2, 3})
    private Integer transferType;

    /**
     * 订单id
     */
    @NotNull
    @Positive
    private Long orderId;

    /**
     * 出库库房id
     */
    @NotNull
    @Positive
    private Integer outboundWarehouseId;

    /**
     * 入库库房id
     */
    @NotNull
    @Positive
    private Integer inboundWarehouseId;

    /**
     * 货物项 [{商品id、名称、数量、计量单位}]
     */
    private List<GoodsItem> goodsItems;
}
